package com.answeringplayer.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 练习记录DTO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PracticeRecordDTO {

    /**
     * 记录ID
     */
    private Long recordId;

    /**
     * 用户ID
     */
    private Long userId;

    /**
     * 练习类型
     */
    private PracticeType practiceType;

    /**
     * 题库ID
     */
    private Integer bankId;

    /**
     * 得分
     */
    private Integer score;

    /**
     * 总题目数
     */
    private Integer totalQuestions;

    /**
     * 正确题目数
     */
    private Integer correctCount;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    // 枚举类
    public enum PracticeType {
        SEQUENTIAL("顺序练习"),
        EXAM("模拟考试"),
        SPECIALIZED("专项练习"),
        WRONG_REDO("错题重做");

        private final String description;

        PracticeType(String description) {
            this.description = description;
        }

        public String getDescription() {
            return description;
        }
    }


}
